const BasePuller = require('./BasePuller');
const ParserFactory = require('../Parsers/ParserFactory');

class QuestionsPuller extends BasePuller {
    constructor() {
        super()
    }
    pull(url) {
        return new Promise((resolve, reject) => {
            this.getPull(url)
                .then(res => {
                    let questionsParser = new ParserFactory('QuestionsParser');
                    let data = questionsParser.parser(res);
                    resolve(data);
                })
                .catch(err => {
                    reject(err);
                })
        })

    }
}


module.exports = QuestionsPuller